Apparatus and method for cache provisioning, configuration for optimal application performance

ABSTRACT

In an embodiment of the invention, a method comprises: recording application-level heuristics and IO-level (input/output-level) heuristics; correlating and analyzing the application-level heuristics and IO-level heuristics; and based on an analysis and correlation of the application-level heuristics and IO-level heuristics, generating a policy for achieving optimal application performance. In another embodiment of the invention, an apparatus comprises: a system configured to record application-level heuristics and IO-level heuristics, to correlate and analyze the application-level heuristics and IO-level heuristics, and based on an analysis and correlation of the application-level heuristics and IO-level heuristics, to generate a policy for achieving optimal application performance.

CROSS-REFERENCE(S) TO RELATED APPLICATIONS

This application is a continuation of and claims benefit from co-pendingU.S. non-provisional patent application Ser. No. 14/660,546, filed Mar.17, 2015, entitled APPARATUS AND METHOD FOR CACHE PROVISIONING,CONFIGURATION FOR OPTIMAL APPLICATION PERFORMANCE, which claims benefitfrom U.S. provisional patent application No. 61/954,007, filed Mar. 17,2014, the disclosures of both of which are incorporated herein byreference in their entirety.

FIELD

Embodiments of the invention relate generally to data storage systems.

DESCRIPTION OF RELATED ART

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of thepresently named inventors, to the extent the work is described in thisbackground section, as well as aspects of the description that may nototherwise qualify as prior art at the time of filing, are neitherexpressly nor impliedly admitted as prior art against this presentdisclosure.

Various caching solutions are available for data storage systems.Typically, these caching solutions lack efficiency in a very complexand/or high volume data storage environment. Additionally, these cachingsolutions do not provide policies that utilize the data sets ofapplications. Additionally, there is a continuing need for conventionalsystems to achieved improved performance.

While the above-noted systems are suited for their intended purpose(s),there is a continuing need for reliable data storage systems.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory onlyand are not restrictive of the invention, as claimed.

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate one (several) embodiment(s) ofthe invention and together with the description, serve to explain theprinciples of the invention.

BRIEF DESCRIPTION OF DRAWINGS

Non-limiting and non-exhaustive embodiments of the invention aredescribed with reference to the following figures, wherein likereference numerals refer to like parts throughout the various viewsunless otherwise specified.

It is to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is a block diagram of an apparatus in accordance with anembodiment of the invention.

FIG. 2 is a flowchart of a method in accordance with an embodiment ofthe invention.

DETAILED DESCRIPTION

In the following detailed description, for purposes of explanation,numerous specific details are set forth to provide a thoroughunderstanding of the various embodiments of the present invention. Thoseof ordinary skill in the art will realize that these various embodimentsof the present invention are illustrative only and are not intended tobe limiting in any way. Other embodiments of the present invention willreadily suggest themselves to such skilled persons having the benefit ofthis disclosure.

In addition, for clarity purposes, not all of the routine features ofthe embodiments described herein are shown or described. One of ordinaryskill in the art would readily appreciate that in the development of anysuch actual implementation, numerous implementation-specific decisionsmay be required to achieve specific design objectives. These designobjectives will vary from one implementation to another and from onedeveloper to another. Moreover, it will be appreciated that such adevelopment effort might be complex and time-consuming, but wouldnevertheless be a routine engineering undertaking for those of ordinaryskill in the art having the benefit of this disclosure. The variousembodiments disclosed herein are not intended to limit the scope andspirit of the herein disclosure.

Exemplary embodiments for carrying out the principles of the presentinvention are described herein with reference to the drawings. However,the present invention is not limited to the specifically described andillustrated embodiments. A person skilled in the art will appreciatethat many other embodiments are possible without deviating from thebasic concept of the invention. Therefore, the principles of the presentinvention extend to any work that falls within the scope of the appendedclaims.

As used herein, the terms “a” and “an” herein do not denote a limitationof quantity, but rather denote the presence of at least one of thereferenced items.

An exemplary embodiment of the invention provides an apparatus andmethod for cache provisioning, configuration for optimal applicationperformance.

FIG. 1 is a block diagram of an apparatus 150 (data storage system 150or system 150) in accordance with an embodiment of the invention. Thesystem 150 is configured to select (and to provide a method forselecting) caching policies to optimize cache utilization andapplication performance based on application IO (input/output) profiles.The system 150 is configured assist in cache sizing (and to provide thesame method that is extended to assist in cache sizing). In other words,the system 150 is configured to provision (and to provide a method forprovisioning) a given size of cache that achieves a certain level ofperformance improvement.

The overall system performance in the presence of a caching solution anda given cache capacity depend on a number of factors. For example, thesefactors can include one or more of the following characteristics (ornature) of the IO stream: (1) the shape of the application IO stream(the distribution of the IO stream in terms of timelines), (2) if the IOis bursty in nature or is well spread out, (3) the distribution of theIO size issued by an application, (4) if the IO stream is predominantlyreads or writes, (5) if the IO stream is sequential or random, (6) sizesand rates of the IO stream, and/or (7) if the IO stream is exhibiting alocality of reference or if the IO stream is exhibiting a great amountof randomness. Such factors in (1) through (7) above are determined foreach system 150, and the appropriate caching policy based on thisdetermination is then designed and applied in system 150 for optimalperformance and cache utilization. The factors (1) through (7) are knownas IO-related contents.

Examples of the factors (IO-related contents) (1) through (7) of IOstreams are now discussed.

Factor (1)—Shape of the IO stream: Common to many businesses—a reportingand analytics use case involves data ingestion into the system followedby data analysis/reporting. The data ingestion is a large sequentialwrite IO stream. This IO stream lasts for a few minutes to several hoursdepending on the size of the dataset to be analyzed. This IO stream isfollowed by a large number of small sized random accesses as a result ofthe “queries” that the analytics software performs. This IO stream ofrandom accesses is followed by a large period of inactivity as new datais gathered.

Factor (2): A bursty IO stream can occur, for example, when a databaseindex is created for the first time or when an application commits alarge amount of buffered data to persistent storage. A bursty IO streamcan also occur when there is a high volume of user activity which isnormally absent, e.g., during a holiday sale.

Factor (3): Most applications have several pieces of information theyneed or work with to function. These pieces of information are, forexample, indexes, logs, tables, and other information such metadatabesides user data. These pieces of information also have a preferredsize of issuing IO requests for each piece of information. For instancea MySQL database accesses its metadata in chunks of 4096 bytes whileuser data is accessed in chunks of 16 KB. However, there are severallayers of storage software which may influence these IO sizes—due tomerging, sorting, and/or buffering. The histogram of IO sizes indicatesthe exact distribution.

Factor (4): Web server is a popular application in this age of theinternet. The IO stream of a Web server application is typically about90% reads of web pages and about 10% writes of logs. A databaseapplication like Oracle Database configured for, e.g., transactionprocessing typically experiences about 70% reads (queries) and about 30%writes (inserts and updates).

Factor (5): Different parts of an application and different applicationsexhibit sequential access patterns or random access patterns. Forexample, the logs of a database are written sequentially while thetables and indexes of logs are accessed randomly. A webserver writes itslogs sequentially.

Factor (7): An application like Twitter may have, e.g., about 10 petabytes of data in its databases. However, it is only the most recenttweets that are accessed frequently. As a consequence, such anapplication may choose to store the most recent tweets together toensure that the underlying storage system can retrieve them efficiently.Such a storage scheme is said to exhibit a “temporal locality ofreference”. Similarly, due to the sluggish nature of a hard disk basedsystem, application and system software store related pieces ofinformation like directory entries and their inodes within the same diskcylinder—this is said to exhibit a “spatial locality of reference”.

In accordance with an embodiment of the invention, a three-part cachingsystem 150 is disclosed and presented. The first part of the system 150comprises an IO (input/output) monitor 101, second part of the system150 comprises an IO stream analyzer 104, and the third part of thesystem 150 comprises a caching engine 105. The monitor 101 is deployedfor a certain period of time on the system being accelerated. Duringthis time, the monitor 101 interprets the IO stream by collectingvarious information as described above. Once the monitoring phasecompletes, the results are analyzed offline by an analyzer program(analyzer 104) which determines the optimal cache size to deliver thedesired performance boost. On the other hand for a given cache size, thepossible IO performance is also determined.

The monitor 101 (a) identifies the IO stream characteristics and (b)assigns meaning (information) by correlating the IO stream withapplication-defined objects such as, for example, database indexes. Oncethis analysis completes, a map of the data is constructed, where the mapis indicative of the parts of the primary storage (a) exhibiting asufficient locality of reference, and (b) contains semanticallyimportant content.

Suppose a database application performing transactions is to beoptimized. Assume that the application stores its index data in diskblocks 100-1000. Suppose the application is issuing an IO stream whichinvolves accessing blocks in the range 0-10000 in a specificpermutation. All IO activity is intercepted by the monitor (101), andthe monitor 101 will then keep track of the frequency of block access,which is recorded persistently for future reference. For example, themonitor 101 may record that the blocks in the range 100-1000 wereaccessed 10 times each in the last 1 (one) hour. Assume that during thistime, the rest of the blocks were accessed only 3 times each—this istypical of a query sensitive workload found in many business use cases.Because the caching architecture has a component (106) which understandsthe meaning of blocks in the range 100-1000, the monitor 106 can thencorrelate that the index blocks have been accessed more frequently thanthe rest of the blocks. Once this application insight has been gained,an appropriate decision can be taken. For example, a decision would beto use 100 GB of cache, employ write back policy, and optimize allindexes—and also aggressively prefetch the index blocks so that theapplication performance can be further optimized.

Based on the IO stream, a decision is made in the relevant accelerationpolicy. In other words, a decision is made whether to accelerate inwrite through, write back, write around, or read only modes. The choiceis made considering the determined average, peak, and low write ratesfor provisioning a write back cache space. Provisioning too much writeback cache space would be an underutilization of the cache. The cachecan only absorb as much writes as can be efficiently copied back to theprimary storage.

This three-part system 150 is, for example, useful in both bare metaldeployments as well as in server virtualized environments (e.g., aserver running VMWare) where cache sizing/utilization is a difficult butimportant problem to solve.

The application 100 can be any typical application running on anOperating System such as, for example, windows, unix, linux, or othertypes of Operating Systems. The application 100 stores data to andretrieves data from the storage 103 which can be any form of a permanentstorage device such as, for example, a hard disk based storage (e.g.,hard disk drive). The storage 103 could be locally attached, SANattached (storage area network attached), or network attached. Thestorage 103 is accessed via the Storage Stack 102 which is typically aset of OS drivers like disk, SCSI, iSCSI, NFS, and/or FileSystem.

The application 100 issues IO requests 152 which can either be a read ora write (501). These IO requests 152 are intended for the Storage Stack102. The Monitor 101 records the nature of the 10 requests 152 (510) andpasses this recorded nature 155 unmodified (502). The Storage Stack 102forwards the recorded nature 155 to the actual storage component 103(503). The nature 155 were similarly described above. Therefore, theMonitor 101 records the heuristics of the IO requests 152 to determinewhich of the IO requests are important.

When the IO request 152 is completed, the notification 160 isintercepted (504) by the monitor 101. Similar monitoring (507) ofapplication-level heuristics 153 is performed at the application levelby the application monitor 106. This application monitor 106 discoversvarious components of the application 100 (components such as, e.g.,databases, indexes, collections, tables, etc.) which can be acceleratedand determines using application specific strategies components whichare frequently accessed and components that are key to applicationperformance (e.g., indexes). These discovered components aresemantically-relevant contents. The application monitor 106 determinesthe layout of such components on the primary storage 103. Theapplication monitor 106 builds further statistics about the underlyingstorage subsystem and the application on top. This flow (500) continuesfor a well-defined period of time (monitor phase) which can be, forexample, approximately 24 hours. An application monitor 106 is highlyspecific for each application 100 type.

As an example, if an application 100 issues IOs 152, the monitor 101records the IO-level heuristics 155, while the application monitor 106records the application-level heuristics 153, and the analyzer 104monitors and correlates the IO-level heuristics 155 andapplication-level heuristics 153.

The acceleration strategy flow 700 is now described. The Analyzer 104periodically harvests the raw statistics 165 from the monitor 101 (601),where the raw statistics 165 includes the recorded IO-level heuristics155 and also harvest the application-level heuristics 153 from theapplication monitor 106 (602). Based on the IO-level heuristics 155 andapplication-level heuristics 153, the analyzer 104 then determines thebest parameters for the cache unit size, cache capacity, read cachesize, write cache size, the regions of the primary storage 103 which aremost important and regions which exhibit a good locality of reference,and these types of regions are candidates for cache acceleration. TheAnalyzer 104 predicts the optimal application performance based on theabove settings and recommends (sends) cache provisioning hints 170 andan acceleration strategy 175 to the caching engine 105 (701). Forexample, the analyzer 104 can determine and/or correlate (based on thestatistics in the IO-level heuristics 155 and application-levelheuristics 153) the regions of the storage 103 that are highly accessed,the shapes of the IOs, the frequency of the need to perform a copybacksince copybacks determine system performance in order to determine apolicy 168 which includes cache provisioning hints 170 and anacceleration strategy 175. For example, a policy 168 determines that fora given block size, the particular regions of the storage 103 have to beaccelerated because they are indexes, and/or a given amount of cachespace has to be provisioned for a given amount (e.g., 20%) of theapplication data set which is accessed at a given amount (e.g., 80%) oftime, and/or a given amount of cached space has to be provisioned foraccelerating writes, and/or the rate to be set for a writeback and/orcopyback since the rate of a copyback has to be set so as to preventconsumption of most of the cache space. Accordingly, the analyzer 104correlates and analyzes the application-level heuristics 153 andIO-level heuristics 155 so that the analyzer 104 generates a policy 168.

Another example of an acceleration policy 168 is now discussed. For ananalytics workload, a policy 168 (e.g., write back acceleration policy168) which accelerates every write would result in near SSD performance.The write back policy is chosen in response to understanding theworkload characteristics—the spread and shape of the IO along with thesequential write followed by random reads. The key here is that while itis a write back policy, it should be noted that every write isoptimized.

For a transaction processing workload, a write back policy is employed,but not every write is optimized. Upon monitoring and determining theavailable cache space, only select writes are optimized to ensure thatthe cache does not “thrash”. Thrashing of the cache is a condition wherefrequently blocks are placed and removed from the cache resulting in suboptimal performance.

Any important application IO 501 is service by the caching engine 105and routed (506) to a high performance cache storage 107. In oneembodiment of the invention, the cache storage 107 is at least one solidstate device (SSD). Unimportant application IOs (or less importantapplication IOs) are routed (503) to the primary storage 103. The lessimportant IOS are stored in queue and are scheduled for processing in asequential manner so to maximize the disk bandwidth duringcommunications.

As an example, in a database transaction processing system, index IO andcertain parts of table data are very important portions of system dataand are cached. Therefore, these very important portions of system dataare routed (506) to the cache 107. The rest of the system data like undolog, redo log, secondary tables are routed (503) to the primary storage103.

As another example, in a web server application, depending on theactivity, some of the website pages are important and are cached.Therefore, these website pages that are important are routed (506) tothe cache 107. The rest of the website data (pages) and website logs arenot important and are passed on and routed (503) to the primary storage103.

In an embodiment of the invention, the above components 101, 104, and106, the caching engine 105 is able to make a sound decision on what andhow much to cache for optimal system performance with minimal cachestorage 107.

FIG. 2 is a flowchart of a method 200 in accordance with an embodimentof the invention. At 205, application-level heuristics and IO-levelheuristics are recorded.

At 210, the application-level heuristics and IO-level heuristics arecorrelated and analyzed.

At 215, based on an analysis and correlation of the application-levelheuristics and IO-level heuristics, a policy 168 for achieving optimalapplication performance is generated by the analyzer 104.

At 220, the policy 168 is sent to a cache engine 105 for use by thecache engine 105 in caching operations.

Accordingly, an embodiment of the invention provides a methodcomprising: recording application-level heuristics and IO-level(input/output-level) heuristics; correlating and analyzing theapplication-level heuristics and IO-level heuristics; and based on ananalysis and correlation of the application-level heuristics andIO-level heuristics, generating a policy for achieving optimalapplication performance.

In another embodiment of the invention, the method further comprises:sending the policy to a cache engine for use by the cache engine incaching operations.

In yet another embodiment of the invention, an apparatus comprises: asystem configured to record application-level heuristics and IO-level(input/output-level) heuristics, to correlate and analyze theapplication-level heuristics and IO-level heuristics, and based on ananalysis and correlation of the application-level heuristics andIO-level heuristics, to generate a policy for achieving optimalapplication performance.

In yet another embodiment of the invention, the apparatus comprises thesystem that is further configured to send the policy to a cache enginefor use by the cache engine in caching operations.

In yet another embodiment of the invention, an article of manufacturecomprises: a non-transient computer-readable medium having storedthereon instructions that permit a method comprising: recordingapplication-level heuristics and IO-level (input/output-level)heuristics; correlating and analyzing the application-level heuristicsand IO-level heuristics; and based on an analysis and correlation of theapplication-level heuristics and IO-level heuristics, generating apolicy for achieving optimal application performance.

In yet another embodiment of the invention, the article of manufactureincludes instructions that permit the method further comprising: sendingthe policy to a cache engine for use by the cache engine in cachingoperations.

Foregoing described embodiments of the invention are provided asillustrations and descriptions. They are not intended to limit theinvention to precise form described. In particular, it is contemplatedthat functional implementation of invention described herein may beimplemented equivalently in hardware, software, firmware, and/or otheravailable functional components or building blocks, and that networksmay be wired, wireless, or a combination of wired and wireless.

It is also within the scope of the present invention to implement aprogram or code that can be stored in a non-transient machine-readable(or non-transient computer-readable medium) having stored thereoninstructions that permit a method (or that permit a computer) to performany of the inventive techniques described above, or a program or codethat can be stored in an article of manufacture that includes anon-transient computer readable medium on which computer-readableinstructions for carrying out embodiments of the inventive techniquesare stored. Other variations and modifications of the above-describedembodiments and methods are possible in light of the teaching discussedherein.

The above description of illustrated embodiments of the invention,including what is described in the Abstract, is not intended to beexhaustive or to limit the invention to the precise forms disclosed.While specific embodiments of, and examples for, the invention aredescribed herein for illustrative purposes, various equivalentmodifications are possible within the scope of the invention, as thoseskilled in the relevant art will recognize.

These modifications can be made to the invention in light of the abovedetailed description. The terms used in the following claims should notbe construed to limit the invention to the specific embodimentsdisclosed in the specification and the claims. Rather, the scope of theinvention is to be determined entirely by the following claims, whichare to be construed in accordance with established doctrines of claiminterpretation.

What is claimed is:
 1. A method, comprising: recording application-levelheuristics; recording IO-level (input/output-level) heuristics in IOrequests; correlating the recorded IO-level heuristics with the recordedapplication-level heuristics; generating a caching policy based on thecorrelation of recorded IO-level heuristics with the recordedapplication-level heuristics; selecting cache settings based cachingpolicy; and configuring a cache unit based on the selected cachesettings.